package com.itheima.reggie.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itheima.reggie.dto.SetmealDto;
import com.itheima.reggie.entity.Dish;
import com.itheima.reggie.entity.Setmeal;
import com.itheima.reggie.entity.SetmealDish;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

public interface SetmealService {

    @Transactional(propagation = Propagation.REQUIRES_NEW)
    Setmeal addSetmeal(SetmealDto setmealDto);

    @Transactional(propagation = Propagation.REQUIRES_NEW)
    Page<SetmealDto> getSetmealPage(int page, int pageSize, String name);

    @Transactional(propagation = Propagation.REQUIRES_NEW)
    void deleteSetmeal(List<Long> ids);

    void setmealStatusByStatus(Integer status, List<Long> ids);

    @Transactional(propagation = Propagation.REQUIRES_NEW)
    void editSetmeal(SetmealDto setmealDto);

    SetmealDto querySetmealById(Long id);

    List<Setmeal> queryDishList(Setmeal setmeal);

    List<SetmealDish> setMealDishDetails(Long setmealId);
}
